<template>
    <page-body>
        <view class="page">
            <view class="flex benben-position-layout flex flex-wrap align-center morderOede_flex_0" :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
                <view class='flex flex-wrap align-center justify-between flex-sub morderOede_fd0_0'>
                    <view class='flex flex-wrap align-center morderOede_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
                        <text class='fu-iconfont2  morderOede_fd0_0_c0_c0'>&#xE794;</text>
                    </view>
                    <view class='flex flex-wrap align-stretch justify-center'>
                        <text class='morderOede_fd0_0_c1_c0'>{{optpe ? '累计订单' : '本月订单'}} </text>
                    </view>
                    <view class='flex flex-wrap align-center justify-end morderOede_fd0_0_c0'>
                    </view>
                </view>

            </view>
            <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
            <!---flex布局flex布局开始-->
            <view class="flex benben-flex-layout flex-wrap align-center morderOede_flex_1">
                <text>订单查看范围</text>
                <view class='flex flex-wrap align-center morderOede_fd1_1' @tap.stop="pickerDiy1716533774374=true">
                    <text class='morderOede_fd1_1_c0'>{{list_name}}</text>
                    <image class='morderOede_fd1_1_c1' mode="aspectFit" :src='STATIC_URL+"84.png"'></image>
                </view>
            </view>

            <!---flex布局flex布局结束-->
            <!---flex布局flex布局开始-->
            <view class="flex flex-direction align-stretch benben-flex-layout morderOede_flex_2">
                <template v-for='(item,key0) in lite'>
                    <view class='flex flex-direction align-stretch morderOede_fd2_0' @tap.stop="handleJumpDiy" data-type="navigateTo" 
					            :data-url="`/pages/riderOrder/meetOrder/meetOrder?order_sn=${item.order_sn}&type=${item.order_types=='4' ? '1' : ''}&aid=${item.order_id}`">
                        <view class='flex flex-wrap align-center'>
                            <text class='morderOede_fd2_0_c0_c0'>订单编号：</text>
                            <text class='morderOede_fd2_0_c0_c0'>{{item.order_sn}}</text>
                            <text class='morderOede_fd2_0_c0_c4' v-if="item.is_show_money == 0">{{item.show_str}}</text>
                            <text class='morderOede_fd2_0_c0_c2' v-if="item.is_show_money == 1">+</text>
                            <text class='morderOede_fd2_0_c0_c3' v-if="item.is_show_money == 1">{{item.rider_profits}}</text>
                        </view>
                        <view class='flex flex-wrap align-center morderOede_fd2_0_c1'>
                            <text class='morderOede_fd2_0_c1_c0'>{{item.create_time}}</text>
							<text class='morderOede_fd2_0_c1_c1' v-if=" item.order_types=='4'">校内餐饮</text>
							<text class='morderOede_fd2_0_c1_c1_1' v-if=" item.order_types=='3'">校园跑腿</text>
							<text class='morderOede_fd2_0_c1_c1_2' v-if=" item.order_types=='2'">外卖代取</text>
							<text class='morderOede_fd2_0_c1_c1' v-if=" item.order_types=='1'">快递代取</text>
                        </view>
                    </view>
                </template>
                <fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData" :listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
            </view>

            <!---flex布局flex布局结束-->
            <!--选择器开始 -->
            <benben-picker ref="benbenWritePickerCodepicker3" :visible.sync="pickerDiy1716533774374" :label.sync='list_name' :value.sync='list_id' :options='list' @change="getye673fcb6043edFunc()" mode='selector' :mask-show='true' :timeout='true' :picker-height='88' default-type='value' :default-props='{"label":"name","value":"value"}'>
                <template #picker-header>
                    <view class='flex flex-wrap align-center justify-between morderOede_picker3_0'>
                        <text @tap="$refs.benbenWritePickerCodepicker3.cancel()">取消</text>
                        <text></text>
                        <text class='morderOede_picker3_0_c2' @tap="$refs.benbenWritePickerCodepicker3.pickerConfirm()">确认</text>
                    </view>
                </template>
            </benben-picker>
            <!--选择器结束 -->


        </view>
    </page-body>
</template>
<script>
    import pagingList from '@/common/mixin/paging_list.js';
    import {
        validate
    } from '@/common/utils/validate.js'

    export default {
        components: {},
        mixins: [pagingList],

        data() {
            return {
                "pickerDiy1716533774374": false,
                "minixPagingListsApi": "",
                "pageingListApiMethod": "",
                "allowOnloadGetList": false,
                "list": [{
                    "name": "今日",
                    "value": "1",
                    "image": ""
                }, {
                    "name": "本周",
                    "value": "2",
                    "image": ""
                }, {
                    "name": "本月",
                    "value": "3",
                    "image": ""
                }, {
                    "name": "本季度",
                    "value": "4",
                    "image": ""
                }, {
                    "name": "本年",
                    "value": "5",
                    "image": ""
                }],
                "list_name": "",
                "lite": [],
                "list_id": "",
				optpe:'',
            };
        },
        computed: {

        },
        watch: {},
        onLoad(options) {
			if(options.optpe){
				this.optpe = 1
				if(uni.getStorageSync('listId')){
					this.list_id = uni.getStorageSync('listId')
					if(this.list_id == 1){
						this.list_name = '今日'
					}else if(this.list_id == 2){
						this.list_name = '本周'
					}else if(this.list_id == 3){
						this.list_name = '本月'
					}else if(this.list_id == 4){
						this.list_name = '本季度'
					}else if(this.list_id == 5){
						this.list_name = '本年'
					} 
				}else{
					this.list_id = 3
					this.list_name = '本月'
				}
				this.getye673fcb6043edFunc()
			}else{
				this.list_id = 3
				this.list_name = '本月'
				this.getye673fcb6043edFunc()
			}
            
        },
        onUnload() {

        },
        onReady() {

        },
        onShow() {

        },
        onHide() {

        },
        onResize() {

        },
        onPullDownRefresh() {

        },
        onReachBottom(e) {

        },
        onPageScroll(e) {

        },
        methods: {
            //骑手端-查询订单列表（数据来自总表）
            getye673fcb6043edFunc() {
				if(this.optpe){
					uni.setStorageSync('listId', this.list_id)
				}
                this.minixPagingListsApi = global.apiUrls.post6673fcb6043ed;
                this.pageingListApiMethod = 'get';
                this.allowOnloadGetList = false;
                this.pagingListPostDataContent = {
					type:this.list_id
				}
                this.listData = [];
                this.lite = this.listData;
                this.pagingListToggle();

            },
            pagingListPostData() {
                return this.pagingListPostDataContent
            }
        }
    };
</script>
<style lang="scss" scoped>
    .page {
        width: 100vw;
        overflow-x: hidden;
        min-height: calc(100vh - var(--window-bottom));
        background: #F8F8F8;
        background-size: 100% auto;
    }

    .morderOede_flex_0 {
        background: #fff;
        width: 750rpx;
        height: 88rpx;
        overflow: hidden;
        z-index: 10;
        top: 0rpx;
        background-size: 100% auto !important;
    }

    .morderOede_fd0_0_c1_c0 {
        font-size: 36rpx;
        font-weight: 700;
        color: #333333;
        line-height: 50rpx;
    }

    .morderOede_fd0_0_c0_c0 {
        font-size: 36rpx;
        color: #333;
    }

    .morderOede_fd0_0_c0 {
        width: 120rpx;
    }

    .morderOede_fd0_0 {
        padding: 0rpx 32rpx 0rpx 32rpx;
    }

    .morderOede_flex_1 {
        padding: 24rpx;
    }

    .morderOede_fd1_1_c1 {
        width: 16rpx;
        height: 10rpx;
        border-radius: 0rpx 0rpx 0rpx 0rpx;
    }

    .morderOede_fd1_1_c0 {
        margin: 0rpx 30rpx 0rpx 0rpx;
    }

    .morderOede_fd1_1 {
        border: 1px solid #BFBFBF;
        background: #FFFFFF;
        margin: 0rpx 0rpx 0rpx auto;
        border-radius: 100rpx 100rpx 100rpx 100rpx;
        padding: 9rpx 24rpx 9rpx 24rpx;
    }

    .morderOede_flex_2 {
        padding: 0rpx 24rpx 0rpx 24rpx;
    }

    .morderOede_fd2_0_c1_c1_2 {
        border: 1px solid rgba(52, 187, 52, 1);
        margin: 0rpx 0rpx 0rpx auto;
        color: rgba(52, 187, 52, 1);
        font-size: 22rpx;
        font-weight: 500;
        padding: 3rpx 5rpx 3rpx 5rpx;
        border-radius: 6rpx;
    }

    .morderOede_fd2_0_c1_c1_1 {
        border: 1px solid rgba(62, 158, 240, 1);
        margin: 0rpx 0rpx 0rpx auto;
        color: rgba(22, 158, 240, 1);
        font-size: 22rpx;
        font-weight: 500;
        padding: 3rpx 5rpx 3rpx 5rpx;
        border-radius: 6rpx;
    }

    .morderOede_fd2_0_c1_c1 {
        border: 1px solid #FF8E21;
        margin: 0rpx 0rpx 0rpx auto;
        color: #FF8E21;
        font-size: 22rpx;
        font-weight: 500;
        padding: 3rpx 5rpx 3rpx 5rpx;
        border-radius: 6rpx;
    }

    .morderOede_fd2_0_c1_c0 {
        color: #999999;
        font-size: 24rpx;
        font-weight: 400;
    }

    .morderOede_fd2_0_c1 {
        margin: 22rpx 0rpx 0rpx 0rpx;
    }

    .morderOede_fd2_0_c0_c3 {
        color: #DA372C;
        font-size: 28rpx;
        font-weight: 700;
    }

    .morderOede_fd2_0_c0_c2 {
        color: #DA372C;
        font-size: 28rpx;
        font-weight: 700;
        margin: 0rpx 0rpx 0rpx auto;
    }
	.morderOede_fd2_0_c0_c4{
		color: #000;
		font-size: 28rpx;
		font-weight: 700;
		margin: 0rpx 0rpx 0rpx auto;
	}

    .morderOede_fd2_0_c0_c0 {
        color: #333333;
        font-size: 32rpx;
        font-weight: 400;
    }

    .morderOede_fd2_0 {
        background: var(--benbenbgColor1);
        background-size: 100% auto;
        border-radius: 16rpx;
        padding: 35rpx 20rpx 35rpx 20rpx;
        margin: 0rpx 0rpx 24rpx 0rpx;
    }

    .morderOede_picker3_0_c2 {
        color: var(--benbenFontColor4);
    }

    .morderOede_picker3_0 {
        border-bottom: 1px solid #eee;
        background: #fff;
        padding: 0rpx 32rpx 0rpx 32rpx;
        line-height: 88rpx;
        border-radius: 25rpx 25rpx 0rpx 0rpx;
        background-size: 100% auto !important;
    }
</style>